package day1;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * @创建人 MBY381
 * @创建时间 2022/6/27 11:23
 * @描述 暂无
 */
public class Board {
    private String myStr;

    Board(String myStr) {
        this.myStr = myStr;
    }

    @Override
    public String toString() {
        return Thread.currentThread().getName() + " " + myStr;
    }

//    @Override
//    public boolean equals(Board board){
//        return true;
//    }


    public static void main(String[] args) throws InterruptedException {
        System.out.println(new Board("wdnmd"));
        Thread thread1 = new Thread(() -> {
            System.out.println(Thread.currentThread().getName()+"  "+Thread.currentThread().hashCode());
            System.out.println(Thread.currentThread().isAlive());
        });
        thread1.setName("wdnmd");
        thread1.start();
        thread1.join();
        thread1.setDaemon(true);

    }


    public String test(String s){
        int[] data=new int[128];
        Arrays.fill(data,0);
        for (int i = 0; i < s.length(); i++) {
            data[s.charAt(i)]++;
        }
        Map<Integer,Integer> map=new HashMap<>();
        for (int i = 0; i < 128; i++) {
            map.put(i,data[i]);
        }
        return null;
    }
}
